<div class="box box-info">
    <div class="box-header with-border">
        <h3 class="box-title">{{stock.name}}</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" [formGroup]="fromModel">
        <div class="box-body">
            <div class="form-group">
                <label for="name" class="col-sm-2 control-label">股票名称:</label>

                <div class="col-sm-6">
                    <input formControlName="name" type="text" class="form-control" id="name" placeholder="股票名称">
                </div>
            </div>
            <div class="form-group">
                <label for="price" class="col-sm-2 control-label">股票价格</label>

                <div class="col-sm-6">
                    <input  formControlName="price" type="number" class="form-control" id="price" placeholder="0">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">股票评分</label>

                <div class="col-sm-6">
                    <app-stars [(rating)]="stock.rating" [readonly]="false"></app-stars>
                </div>
            </div>
            <div class="form-group">
                <label for="desc" class="col-sm-2 control-label">股票描述</label>

                <div class="col-sm-6">
                    <textarea formControlName="desc" id="desc" cols="70" rows="5">
                    </textarea>
                </div>
            </div>
            <div class="form-group">
                <label for="checkds" class="col-sm-2 control-label">股票类型</label>

                <div class="col-sm-10">
                    <div class="row" formArrayName="cateqories">
                        <div *ngFor="let category of cateqories;let i=index;"  class="col-sm-2">

                            <div class="checkbox">
                                <label>
                                    <input [formControlName]="i" type="checkbox">{{category}}
                                </label>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <!-- /.box-body -->
        <div class="box-footer">
            <button (click)="cuncel()" type="button" class="btn btn-default">取消</button>
            <button (click)="save()" type="button" class="btn btn-info pull-right">确定</button>
        </div>
        <!-- /.box-footer -->
    </form>
</div>